import * as apiService from '@/services/api'

/**
 * 流量统计分析-访问量统计-总访问量
 * @param params
 * @returns {Promise<*>}
 */
const visitBasicApi = (params) => {
  return apiService.post(api.OPERATIONAL_VISIT_BASIC,
    params);
};

/**
 * 流量统计分析-访问量统计-详细数据
 * @param params
 * @returns {Promise<*>}
 */
const visitSummaryApi = (params) => {
  return apiService.post(api.OPERATIONAL_VISIT_SUMMARY,
    params);
};

/**
 * 流量统计分析-访问地域统计-总访问量
 * @param params
 * @returns {Promise<*>}
 */
const locationBasicApi = (params) => {
  return apiService.post(api.OPERATIONAL_LOCATION_BASIC,
    params);
};

/**
 * 流量统计分析-访问地域统计-详细数据
 * @param params
 * @returns {Promise<*>}
 */
const locationSummaryApi = (params) => {
  return apiService.post(api.OPERATIONAL_LOCATION_SUMMARY,
    params);
};

/**
 * 流量统计分析-来路域名统计-总访问量
 * @param params
 * @returns {Promise<*>}
 */
const referBasicApi = (params) => {
  return apiService.post(api.OPERATIONAL_REFER_BASIC,
    params);
};

/**
 * 流量统计分析-来路域名统计-详细数据
 * @param params
 * @returns {Promise<*>}
 */
const referSummaryApi = (params) => {
  return apiService.post(api.OPERATIONAL_REFER_SUMMARY,
    params);
};

/**
 * 流量统计分析-来路域名统计-分时统计
 * @param params
 * @returns {Promise<*>}
 */
const referSummaryTimeApi = (params) => {
  return apiService.post(api.OPERATIONAL_REFER_SUMMARY_TIME,
    params);
};

/**
 * 访问终端统计-总访问量
 * @param params
 * @returns {Promise<*>}
 */
const deviceBasicApi = (params) => {
  return apiService.post(api.OPERATIONAL_DEVICE_BASIC,
    params);
};

/**
 * 访问终端统计-分时统计
 * @param params
 * @returns {Promise<*>}
 */
const deviceSummaryTimeApi = (params) => {
  return apiService.post(api.OPERATIONAL_DEVICE_SUMMARY_TIME,
    params);
};

/**
 * 访问终端统计-终端详细
 * @param params
 * @returns {Promise<*>}
 */
const deviceSummaryApi = (params) => {
  return apiService.post(api.OPERATIONAL_DEVICE_SUMMARY,
    params);
};

/**
 * 导出访问量数据报表
 * @param params
 * @returns {Promise<*>}
 */
const exportFlowAmount = (params) => {
  return apiService.post(api.EXPORT_FLOW_AMOUNT,
    params);
};

export {
  //流量统计分析首页接口-begin
  visitBasicApi,
  visitSummaryApi,
  //地域统计
  locationBasicApi,
  locationSummaryApi,
  //来路域名统计
  referBasicApi,
  referSummaryApi,
  referSummaryTimeApi,
  //终端统计
  deviceBasicApi,
  deviceSummaryTimeApi,
  deviceSummaryApi,

  //导出访问量列表
  exportFlowAmount
};
